import { createStore } from 'vuex'
const store = createStore({
  state() {
    return {
      count: 0,
      info: {
        name: 'zjd',
        age: 18,
      },
    }
  },
  mutations: {
    increment(state, payload = 1) {
      state.count += payload
    },
    changeName(state, payload) {
      state.info.name = payload.name
    },
  },
})
export default store
